package com.fivefu.core.hik.dto.response;


import com.fivefu.core.hik.entity.DbHikCamera;
import com.fivefu.core.hik.entity.DbHikVehicleCamera;
import io.swagger.annotations.ApiModelProperty;


/**
 * 根据车辆编号与设备编号获取监控点信息列表V1返回信息
 */
public class EncodeVehicleCameraDetail {


    @ApiModelProperty("监控点编号")
    private String indexCode;

    @ApiModelProperty("监控点名称")
    private String cameraName;

    @ApiModelProperty("通道编号")
    private Integer channelNum;

    @ApiModelProperty("通道类型")
    private String channelType;

    @ApiModelProperty("设备编号")
    private String deviceIndexCode;

    /**
     * 车辆监控点关联表赋值
     * @param vehicleIndexCode 车俩编号
     * @return 车辆与监控点关联对象
     */
    public DbHikVehicleCamera replaceDbHikVehicle(String vehicleIndexCode) {
        DbHikVehicleCamera vehicleCamera = new DbHikVehicleCamera();
        vehicleCamera.setVehicleIndexCode(vehicleIndexCode);
        vehicleCamera.setCameraIndexCode(this.indexCode);
        vehicleCamera.setChannelNum(this.channelNum);
        vehicleCamera.setChannelType(this.channelType);
        vehicleCamera.setDeviceIndexCode(this.deviceIndexCode);
        return vehicleCamera;
    }

    /**
     * 车辆监控点关联表赋值
     * @param vehicleIndexCode 车俩编号
     * @param id 车辆与监控点关联表id
     * @return 车辆与监控点关联对象
     */
    public DbHikVehicleCamera replaceDbHikVehicleModify(String vehicleIndexCode, Long id) {
        DbHikVehicleCamera vehicleCamera = new DbHikVehicleCamera();
        vehicleCamera.setId(id);
        vehicleCamera.setVehicleIndexCode(vehicleIndexCode);
        vehicleCamera.setCameraIndexCode(this.indexCode);
        vehicleCamera.setChannelNum(this.channelNum);
        vehicleCamera.setChannelType(this.channelType);
        vehicleCamera.setDeviceIndexCode(this.deviceIndexCode);
        return vehicleCamera;
    }

    /**
     *  编辑监控点赋值
     * @return
     */
    public DbHikCamera replaceDbHikCameraModify() {
        DbHikCamera camera = new DbHikCamera();
        camera.setCameraIndexCode(this.indexCode);
        camera.setEncodeDevIndexCode(this.deviceIndexCode);
        camera.setCameraName(this.cameraName);
        camera.setChannelType(this.channelType);
        camera.setChannelNo(String.valueOf(this.channelNum));
        return camera;
    }

    public String getIndexCode() {
        return indexCode;
    }

    public void setIndexCode(String indexCode) {
        this.indexCode = indexCode;
    }

    public String getCameraName() {
        return cameraName;
    }

    public void setCameraName(String cameraName) {
        this.cameraName = cameraName;
    }

    public Integer getChannelNum() {
        return channelNum;
    }

    public void setChannelNum(Integer channelNum) {
        this.channelNum = channelNum;
    }

    public String getChannelType() {
        return channelType;
    }

    public void setChannelType(String channelType) {
        this.channelType = channelType;
    }

    public String getDeviceIndexCode() {
        return deviceIndexCode;
    }

    public void setDeviceIndexCode(String deviceIndexCode) {
        this.deviceIndexCode = deviceIndexCode;
    }

    @Override
    public String toString() {
        return "EncodeVehicleCameraDetail{" +
                "indexCode='" + indexCode + '\'' +
                ", cameraName='" + cameraName + '\'' +
                ", channelNum=" + channelNum +
                ", channelType='" + channelType + '\'' +
                ", deviceIndexCode='" + deviceIndexCode + '\'' +
                '}';
    }
}
